<template>
  <div>


    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>详细数据</span>
      </div>
      <div class="text item">
        项目名称: {{form.entryname}}
      </div>
      <div class="text item">
        工程名称：{{form.projectname}}
      </div>
      <div class="text item">
        开始时间：{{form.createtime}} 结束时间 {{form.endtime}}
      </div>
      <div class="text item">
        工程量：{{form.quantities}}
      </div>
      <div class="text item">
        检查内容：{{form.contents}}
      </div>
      <div class="text item">
        {{form.isqualified}}
      </div>
    </el-card>

    <el-card class="box-card">
      <div >
        <img :src= form.image class="image">
      </div>
    </el-card>

  </div>
</template>

<script>
import loadApi from '@/api/img';
export default {
  name: 'showId',
  data() {
    return {
      id:'',
      form: {

      }
    }
  },
   async created () {
    var path = window.location.href
    var id = path.split(/=/); //以逗号作为分隔符
     this.id = id[1]
      console.log(id)
     let res = await loadApi.showId(this.id)
     console.log(res.data.entryname)
     this.form = res.data
     console.log(this.form.image)
  },
  methods:{
    async show(){
      console.log(this.id)
      let res = await loadApi.showId(this.id)
      // console.log(res.data)
      this.form.gongcheng = res.data
      console.log(form.gongcheng)
    }
  }
}
</script>

<style scoped>
.box-card{
  margin: auto;
  margin-top: 20px;
  width: 480px;
}
 .time {
   font-size: 13px;
   color: #999;
 }

.bottom {
  margin-top: 13px;
  line-height: 12px;
}

.button {
  padding: 0;
  float: right;
}

.image {
  width: 100%;
  display: block;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}

.clearfix:after {
  clear: both
}

</style>
